package com.mmall.dao;

import com.mmall.pojo.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    List<Goods> selectGoodsListByUserId(Integer userId);

    List<Goods> selectAll();

    int collectionGoods(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId);

    int cancelCollectionGoods(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId);

    int selectCollection(@Param("userId") Integer userId,@Param("goodsId") Integer goodsId);

    List<Goods> selectListByGoodsType(String goodsType);

    List<Goods> selectListByEntity(Goods goods);
    List<Goods> selectCollectionList(Integer userId);
}